import akshare as ak

index_zh_a_hist_df = ak.index_zh_a_hist(symbol="000300", period="daily", start_date="20220401", end_date="20240401")
print(index_zh_a_hist_df)
index_zh_a_hist_df.to_excel('沪深300指数数据.xlsx', index=False)
index_zh_a_hist_df.set_index('日期', inplace=True)
